SetVar bHighSpeed 0 { No answer, default to low speed }
Jump "HostConnect"
!
-LABEL GoLow
SetVar bHighSpeed 0
Jump "HostConnect"
!
-LABEL GoHigh
SetVar bHighSpeed 1
!
!
-LABEL HostConnect
!
! Sending America Online node number.
!
ClrMchStr
MatchStr "44" "NO CARRIER"
MatchStr "17" " CONNECTED"
MatchStr "32" "DISCONNECT" {Invalid node}
MatchStr "28" "\0D\0A ?" {Command error}
MatchStr "32" "NOT RE" {AO down}
MatchStr "32" "AVAIL" {AO down}
MatchStr "32" "REJECT" {AO down}
MatchStr "26" "LOCAL" {Net busy}
MatchStr "26" "BUSY" {Net busy}
MatchStr "28" "ERROR" {Command error}
MatchStr "32" "NOT PERMIT" {Access via wats line.}
MatchStr "32" "CONGEST" { congested }
MatchStr "32" "NOT OPERATING"
!
Pause 20
DsplyMsg "Step 6: Connecting to America Online"
ifEq bHighSpeed 0
Xmit "C ~SLOW~SUBA*mac aol 0001\0D"
Else
Xmit "C ~FAST~SUBA*mac aol 0001\0D"
Wait 2700
Jump "37"
!
!-----------------------------------
!
-LABEL 17 { System Ready ... All is well }
DsplyMsg "Step 7: Checking Password…"
Exit 0
!
!-----------------------------------
!
-Label 18 { User aborted sequence }
Exit -51
!
-Label 19 { User aborted sequence...dont need to hang up though}
Exit -111
!-----------------------------------
!
-Label 20 {800 number sequence.}
Pause 30
!
ClrMchStr
MatchStr "44" "NO CARRIER"
MatchStr "16" "\0D\0A@"
MatchStr "28" "\0D\0A ?" {Command error}
MatchStr "20" "EXCHANGE" {800 number dialing.}
!
Xmit "~TLN2\0D"
Wait 2000
Jump "37"
!
!
!-----------------------------------
!
-Label 26 {Busy phone}
IfEq ~ATMP 0
DsplyMsg "The number dialed is busy. Trying second number."
Talert "The number dialed is busy. Please try again later.\0D\0DTo find another local access number, select Get Local # from the Locality pop-up menu, and click on Sign On."
IfEq ~ATMP 1
OneAlert 1 "\0D\0DFor more information, select Help from the Apple menu."
Exit -1
!
!-----------------------------------
!
!
!
-Label 27 {No Answer}
IfEq ~ATMP 0
DsplyMsg "The number dialed is not answering. Trying second number."
TAlert "The number dialed is not answering. Please try again later.\0D\0DTo find another local access number, select Get Local # from the Locality pop-up menu, and click on Sign On."
IfEq ~ATMP 1
OneAlert 1 "\0D\0DFor more information, select Help from the Apple menu."
Exit -1
!
!---------------------------------------------
!
-Label 28
Talert "The access company failed to respond. Please try again later.\0D\0DTo find another local access number, select Get Local # from the Locality pop-up menu, and click on Sign On."
IfEq ~ATMP 1
OneAlert 1 "\0D\0DFor more information, select Help from the Apple menu."
Exit -1
!
!-----------------------------------
!
-Label 32 {not_avail}
TAlert "The final connection step to ~APPL did not complete. Please try again later."
Jump "36"
!
!-----------------------------------
!
-Label 33 {no response from modem}
TAlert "~APPL was unable to initialize your modem.\0D\0D1. Turn your modem off, then back on.\0D2. Check your modem cable connections.\0D"
IfEq ~ATMP 1
OneAlert 1 "3 Click on Setup, and verify your modem type selection.\0D\0DFor more information, select Help from the Apple menu."
Exit -1
!
!-----------------------------------
!
-Label 35
Exit -1
!
-Label 36
IfEq ~ATMP 1
OneAlert 1 "\0D\0DFor more information, select Help from the Apple menu."
Exit -1
!-----------------------------------
! Some new error messages since error #1 is getting kind of meaningless.
-Label 37 { Time-Out }
TAlert "It has taken too long to process your connection.\0D\0D1. Test your modem with another communications program.\0D2. Verify the local access number by selecting Get Local # "
IfEq ~ATMP 1
OneAlert 1 "from the Locality pop-up menu, then clicking on Sign On.\0D\0DFor more information, select Help from the Apple menu."
Exit -1
-Label 38 {Modem command error}
TAlert "Your modem is not accepting our commands.\0D\0D1. Turn your modem off, then back on.\0D2. Click on Setup, and verify your modem type selection."
Jump "36"
!
-Label 40
TAlert "The modem has reported no dial tone.\0D1. Check the phone line connections.\0D2. Make sure the line from the wall is connected to the jack labeled Line, Telco, Wall, or Jack.\0D"
IfEq ~ATMP 1
OneAlert 1 "3. Use a telephone to check for a dial tone.\0D\0DFor more information, select Help from the Apple menu."
Exit -1
!
-Label 41
TAlert "The number dialed did not connect to the access company.\0D\0D1. Verify your setup information by clicking on Setup.\0D2. Verify the local access number by selecting Get Local # "
IfEq ~ATMP 1
OneAlert 1 "from the Locality pop-up menu, then clicking on Sign On.\0D\0DFor more information, select Help from the Apple menu."
Exit -1
!
-Label 42
TAlert "The modem was unable to get a carrier signal.\0D\0D1. Verify your setup information by clicking on Setup.\0D2. Verify the local access number by selecting Get Local # "
IfEq ~ATMP 1
OneAlert 1 "from the Locality pop-up menu, then clicking on Sign On.\0D\0DFor more information, select Help from the Apple menu."
Exit -1
!
-Label 43
TAlert "The modem detected a timeout.\0D\0D1. Test your modem with another communications program.\0D2. Verify the local access number by selecting Get Local # "
IfEq ~ATMP 1
OneAlert 1 "from the Locality pop-up menu, then clicking on Sign On.\0D\0DFor more information, select Help from the Apple menu."
Exit -1
!
-Label 44
TAlert "The modem has lost carrier signal. Please try again."
Exit -1
!
-Label 45
TAlert "The number specified is not a Sprint number.\0D\0D1. Verify your setup information by clicking on Setup.\0D2. Verify the local access number by selecting Get Local #"
IfEq ~ATMP 1
OneAlert 1 "from the Locality pop-up menu, then clicking on Sign On."
Exit -1
!
-Label 46
OneAlert 1 "Connection speeds above 9600 bps require the use of Hardware Handshaking."
Exit -1
!------------------------------------
-Label CheckPhoneLength
!
NewString sPhoneNumber
SetVar sPhoneNumber ~FONE
NewLngInt lCount
SetVar lCount 4
!
-Label TopPhoneLoop
IfEq lCount 0
Jump "FinishPhoneLength"
DecVar sPhoneNumber
DecVar lCount
Jump "TopPhoneLoop"
!
-Label FinishPhoneLength
IfEq sPhoneNumber ""
Jump "EmptyPhone"
Return
!
-Label EmptyPhone
OneAlert 1 "You must enter phone numbers before signing on.\0D\0DSelect ""Setup"" and verify the phone numbers you have entered."
Exit -111
!------------------------------------
!
*-Label 0 {Hangup Sequence}
*CanBtn 2
!
*Flush
!
*SetTries 0 {DMC: see if we can get the modem's attention}
*ClrMchStr
*MatchStr "1" "OK" { Dont look for an echo, may be a}
*MatchStr "1" "NO" { false echo. Any type of match is good}
*MatchStr "1" ">" { Special case for Avatex 1200 modems}
!
*Pause 180 { Pause for 3 sec min gap }
*Xmit "+++" { Get the modems attention}
*Pause 180 { Pause for 3 sec min gap }
*IfTries 0 "1"
!
*ClrMchStr
*MatchStr "1" "OK"
*MatchStr "2" "CARRIER" {Any type of match is good}
*MatchStr "1" ">" { Special case for Avatex 1200 modems}
!
*Pause 180 { Pause for 3 sec min gap }
*Xmit "+++" { Get the modems attention}
*Pause 180 { Pause for 3 sec min gap }
!
*-Label 1
*IncTries
*ClrMchStr
*MatchStr "2" "ERROR"
*MatchStr "2" "OK"
*MatchStr "2" "CARRIER"
*MatchStr "2" ">" { Special case for Avatex 1200 modems}
!
*Pause 40
*Xmit "$ATTENTION$H\0D"
*Wait 300
!
*-Label 2
*Pause 40 { Allow modem to settle between commands.}